package com.abc.pay.client;

public class TrxException extends Exception {
    public static final String TRX_EXC_CODE_1000 = "1000";
    public static final String TRX_EXC_CODE_1001 = "1001";
    public static final String TRX_EXC_CODE_1002 = "1002";
    public static final String TRX_EXC_CODE_1003 = "1003";
    public static final String TRX_EXC_CODE_1004 = "1004";
    public static final String TRX_EXC_CODE_1005 = "1005";
    public static final String TRX_EXC_CODE_1006 = "1006";
    public static final String TRX_EXC_CODE_1007 = "1007";
    public static final String TRX_EXC_CODE_1008 = "1008";
    public static final String TRX_EXC_CODE_1009 = "1009";
    public static final String TRX_EXC_CODE_1010 = "1010";
    public static final String TRX_EXC_CODE_1100 = "1100";
    public static final String TRX_EXC_CODE_1101 = "1101";
    public static final String TRX_EXC_CODE_1102 = "1102";
    public static final String TRX_EXC_CODE_1103 = "1103";
    public static final String TRX_EXC_CODE_1104 = "1104";
    public static final String TRX_EXC_CODE_1201 = "1201";
    public static final String TRX_EXC_CODE_1202 = "1202";
    public static final String TRX_EXC_CODE_1203 = "1203";
    public static final String TRX_EXC_CODE_1204 = "1204";
    public static final String TRX_EXC_CODE_1205 = "1205";
    public static final String TRX_EXC_CODE_1206 = "1206";
    public static final String TRX_EXC_CODE_1207 = "1207";
    public static final String TRX_EXC_CODE_1301 = "1301";
    public static final String TRX_EXC_CODE_1302 = "1302";
    public static final String TRX_EXC_CODE_1303 = "1303";
    public static final String TRX_EXC_CODE_1304 = "1304";
    public static final String TRX_EXC_CODE_1305 = "1305";
    public static final String TRX_EXC_CODE_1999 = "1999";
    public static final String TRX_EXC_MSG_1000 = "无法读取商户端配置文件";
    public static final String TRX_EXC_MSG_1001 = "商户端配置文件中参数设置错误";
    public static final String TRX_EXC_MSG_1002 = "无法读取证书文档";
    public static final String TRX_EXC_MSG_1003 = "无法读取商户私钥";
    public static final String TRX_EXC_MSG_1004 = "无法写入交易日志文档";
    public static final String TRX_EXC_MSG_1005 = "证书过期";
    public static final String TRX_EXC_MSG_1006 = "证书格式错误";
    public static final String TRX_EXC_MSG_1007 = "无法读取商户端配置项配置文件";
    public static final String TRX_EXC_MSG_1008 = "无法读取商户端配置项获取方式";
    public static final String TRX_EXC_MSG_1009 = "无法读取商户端配置项实现类";
    public static final String TRX_EXC_MSG_1010 = "商户端配置项实现类未设定";
    public static final String TRX_EXC_MSG_1100 = "商户提交的交易资料不完整";
    public static final String TRX_EXC_MSG_1101 = "商户提交的交易资料不合法";
    public static final String TRX_EXC_MSG_1102 = "签名交易报文时发生错误";
    public static final String TRX_EXC_MSG_1103 = "无法连线签名服务器";
    public static final String TRX_EXC_MSG_1104 = "签名服务器返回签名错误";
    public static final String TRX_EXC_MSG_1201 = "无法连线线上支付平台";
    public static final String TRX_EXC_MSG_1202 = "提交交易时发生网络错误";
    public static final String TRX_EXC_MSG_1203 = "无法接收到线上支付平台的响应";
    public static final String TRX_EXC_MSG_1204 = "接收线上支付平台响应报文时发生网络错误";
    public static final String TRX_EXC_MSG_1205 = "无法辨识线上支付平台的响应报文";
    public static final String TRX_EXC_MSG_1206 = "线上支付平台服务暂时停止";
    public static final String TRX_EXC_MSG_1207 = "未能接受到有效响应，请检查配置文件配置项是否正确";
    public static final String TRX_EXC_MSG_1301 = "线上支付平台的响应报文不完整";
    public static final String TRX_EXC_MSG_1302 = "线上支付平台的响应报文签名验证失败";
    public static final String TRX_EXC_MSG_1303 = "无法辨识线上支付平台的交易结果";
    public static final String TRX_EXC_MSG_1304 = "解压缩交易记录时发生错误";
    public static final String TRX_EXC_MSG_1305 = "读取商户证书时失败";
    public static final String TRX_EXC_MSG_1999 = "系统发生无法预期的错误";
    public static final String TRX_EXC_MSG_1400 = "未设定外转订单编号";
    public static final String TRX_EXC_MSG_1401 = "未设定鉴权订单编号";
    protected String iCode = "";
    protected String iDetailMessage = "";

    public TrxException(String aCode, String aMessage) {
        super(aMessage);
        this.iCode = aCode.trim();
        this.iDetailMessage = aMessage.trim();
    }

    public TrxException(String aCode, String aMessage, String aDetailMessage) {
        super(aMessage.trim());
        this.iCode = aCode.trim();
        this.iDetailMessage = aDetailMessage.trim();
    }

    public String getCode() {
        return this.iCode;
    }

    public String getMessage() {
        return super.getMessage();
    }

    public String getDetailMessage() {
        return this.iDetailMessage;
    }
}

